import Login from '../views/login';

import Registry from '../views/registry';

import Main from '../views/main';

import Home from '../views/main/home';

import My from '../views/main/my';

import Create from '../views/create';

import VoteList from '../views/voteList';

import {RouteItem} from './router.d';


let routes:RouteItem[] = [
    {
        path:'/login',
        component:Login
    },
    {
        path:'/registry',
        component:Registry
    },
    {
        path:'/main',
        component:Main,
        children:[
            {
                path:'/main/home',
                component:Home
            },
            {
                path:'/main/my',
                component:My
            },
            {
                path:'/main',
                redirect:'/main/home'
            }
        ]
    },
    {
        path:'/create',
        component:Create
    },
    {
        path:'/votelist',
        component:VoteList
    },
    {
        path:'/',
        redirect:'/main'
    }
];

export default routes